/*
 * .
 * All Rights Reserved.
 */
package com.model.demo.designmodel.factory.simplefactory;


import com.model.demo.designmodel.factory.product.BMW;
import com.model.demo.designmodel.factory.product.Benz;
import com.model.demo.designmodel.factory.product.Car;

/**
 * CarFactory
 *
 * @author Liao Dongshan, 2019/5/6
 *
 */
public class CarFactory {
    public static Car getCar(int params){
        if(params==1){
            return new BMW();
        }else if(params==2){
            return new Benz();
        }
        return null;
    }
}
